package site.ruolin.KeyGen.Key;

/**
 * 密钥对的封装类
 * @author ruolin on 2025/09/11
 */
public class KeyPair {
    private final PublicKey publicKey;
    private final PrivateKey privateKey;

    /**
     * 构造函数
     * @param publicKey 公钥
     * @param privateKey 私钥
     */
    public KeyPair(PublicKey publicKey, PrivateKey privateKey) {
        this.publicKey = publicKey;
        this.privateKey = privateKey;
    }

    /**
     * 获取公钥
     * @return 公钥
     */
    public PublicKey getPublicKey() {
        return publicKey;
    }

    /**
     * 获取私钥
     * @return 私钥
     */
    public PrivateKey getPrivateKey() {
        return privateKey;
    }
}
